<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script>
        window.hdjs = {};
        window.hdjs.base = '/hdjs';
        window.hdjs.uploader = 'php/uploader.php?';
        window.hdjs.filesLists = 'php/filesLists.php?';
    </script>
    <script src="../dist/static/requirejs/require.js"></script>
    <script src="../dist/static/requirejs/config.js"></script>
</head>
<body style="padding: 50px;">
<div class="input-group">
    <span class="input-group-addon">手机号或邮箱</span>
    <input class="form-control" name="username" value="230007112@qq.com">
    <span class="input-group-btn">
         <button class="btn btn-default" id="bt">发送验证码</button>
    </span>
</div>
<script>
    require(['hdjs'], function (hdjs) {
        var option = {
            //按钮
            el: '#bt',
            //后台链接
            url: 'php/validCode.php',
            //验证码等待发送时间
            timeout: '60',
            //表单，手机号或邮箱的INPUT表单
            input: '[name="username"]'
        }
        hdjs.validCode(option);
    })
</script>
</body>
</html>